package org.mch.func.cons;

import java.io.Serializable;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.util.HashMap;
import java.util.Map;

import org.mch.func.db.conn.DBConnInfo;

public class ConsDB implements Serializable {
	private static final long serialVersionUID = 1923214999583590422L;

	/**
	 * 数据库连接
	 */
	public static Connection conn;

	public static DBConnInfo connInfo = new DBConnInfo();

	public static DatabaseMetaData dbmd;

	public static final Map<String, String> portMap = new HashMap<String, String>();
	static {
		portMap.put("Oracle 10g", "1521");
		portMap.put("DB2", "50000");
		portMap.put("MSSQLServer 2000", "1433");
		portMap.put("MSSQLServer 2005", "1433");
		portMap.put("MySQL 5", "3306");
		portMap.put("PostgreSQL 8", "5432");
		portMap.put("Access2003", "");
		portMap.put("Access2007", "");
		portMap.put("SQLite3", "");
	}

	public static final String[] dbtype = { "Oracle 10g", "DB2", "MSSQLServer 2000", "MSSQLServer 2005", "MySQL 5",
			"PostgreSQL 8", "Access2003", "Access2007", "SQLite3" };

	public static final int UNKNOWN = -1;

	public static final int Oracle10g = 0;

	public static final int DB2 = 1;

	public static final int MSSQLServer2000 = 2;

	public static final int MSSQLServer2005 = 3;

	public static final int MySQL5 = 4;

	public static final int PostgreSQL8 = 5;

	public static final int Access2003 = 6;

	public static final int Access2007 = 7;

	public static final int SQLite3 = 8;

	public static final int HSQL = 9;

	public static final String[] dbport = { "1521", "1433", "3600", "5432", "50000" };
}
